package info.touret.winecellar.userinfo.server;

import info.touret.winecellar.userinfo.server.domain.UserInfo;

import org.apache.log4j.Logger;

import com.google.appengine.api.users.UserServiceFactory;

public class UserInfoFactoryImpl implements UserInfoFactory {

	private final static Logger trace  = Logger.getLogger(UserInfoFactoryImpl.class);

	@Override
	public UserInfo get() {
		UserInfo userinfo = UserInfo.findCurrentUserInApp(UserServiceFactory.getUserService().getCurrentUser());
		trace.info("user injecte par le provider : "+userinfo);
		return userinfo;
	}
}
